---
root: "/v5.1"
description: "Swift documentation for 'fatalError'"
title: "fatalError"
layout: "default"
keywords: ""
---

<div class="intro-declaration"><code class="language-swift">func fatalError(_:file:line:)(_ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line) -> Never</code></div><div class="discussion comment"><p>Unconditionally prints a given message and stops execution.
</p>
</div>